package readtreefromfile;

public class ParseSpaceIndentCategory implements IParseCategory {


	@Override
	public Category parseCat(String value) {
		if(value == null){
			return null;
		}
		int level=0;
		for(int i=0;i<value.length();i++){
			if(value.charAt(i)==' '){
				level++;
			}else{
				break;
			}
		}
		return new Category(level,value.trim());
	}

}
